home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_02
/
smith
/
code13_2.c
< prev
next >
Wrap
Text File
|
1993-12-14
|
422b
|
17 lines
#define BASE 91 /* # possible output chars */
#define FIRST_CODE '!' /* lowest output character */
#define MAKE_PRINT(c) ((c)+FIRST_CODE)
put_2_ASCII (n)
unsigned int n;
{
/* put_2_ASCII() converts the 13-bit argument to two
** characters and writes them to the output file.
*/
unsigned int rem;
rem = n % BASE;
n = n / BASE;
putc (MAKE_PRINT(n), outf);
putc (MAKE_PRINT(rem), outf);
}